<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <div v-bind:style="{color:activeColor,fontSize:fontSize,width:widthStyle,height:heightStyle,border:borderStyle}">测试样式</div>
        <div v-bind:style="[baseStyle,overridingStyles]">测试样式</div>
        <button v-on:click="handle">切换</button>
    </div>
    <script>
        var vm = new Vue({
            el:"#app",
            data:{
                activeColor:'red',
                fontSize:'20px',
                widthStyle:'200px',
                heightStyle:'200px',
                borderStyle:'1px solid red'
               
            },
            methods:{
                handle:function(){
                    this.heightStyle = '150px';
                }
            }
        })
    </script>
</body>
</html>